package com.demo.bean9001.controller.partner;

import com.demo.bean9001.service.partner.CooperativePartnerService;
import com.demo.common.entity.CooperativePartner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 合作伙伴
 * 作者：张佑威
 * 分配任务：张改
 * 插入数据：张佑威
 */
@RestController
public class CooperativePartnerController {
    @Autowired
    private CooperativePartnerService cooperativePartnerService;

    /**
     * 合作伙伴logo
     * @param industryId
     * @return
     */
    @GetMapping("/Partner/{industryId}")
    public List<CooperativePartner> selectByIndustryId(@PathVariable("industryId") Integer industryId){
        System.out.println(9000);
        return cooperativePartnerService.selectByIndustryId(industryId);
    }

    /**
     * 合作伙伴详情
     * @param id
     * @return
     */
    @GetMapping("/PartnerDetail/{id}")
    public CooperativePartner selectById(@PathVariable("id") Integer id){
        return cooperativePartnerService.selectById(id);
    }
}
